Book Contents

Batch Import File Format

The batch import file is used when the user wishes to import multiple XML files into multiple graphic displays in one step. The file is created automatically when the user does an export, and is named BatchImport_<HMI Project name>.xml. The file is created in the same directory as the XML files exported for each graphic display, that is, the location specified in the Export Folder dialog box of the Graphics Import Export Wizard.

The batch import file is in XML format and must be structured as follows:

<gfxImport importFolder="">

<import importFile="" importType="" display="" />

<import importFile="" importType="" display="" />

</gfxImport>

where:

  • importFolder is an optional attribute specifying the folder where the import files are located (for example, importFolder="C:\Imports").
  • importFile is the name of the XML file to import (for example, importFile="Pump.xml"). This attribute must be there, and must not contain a path.
  • importType is an optional attribute that can set to 'create' or 'update'.
  • display is an optional name of the graphic display to import into (for example, display="Pump").

The root <gfxImport> element must contain at least the importFile attribute. The importFolder, importType, and display attributes are optional attributes of this element.

The importFile attribute is the name of the XML file used in one import operation. The importFile attribute must not contain a path. If the importFolder attribute is present, the file specified in the importFile attribute is assumed to exist in this folder, otherwise the file is assumed to exist in the same folder as the batch import file.

The optional attribute importType can have a value of create or update and defines whether the import operation will create new graphic objects or update existing objects during importing. This attribute overrides the setting in the Batch Import File dialog box of the Graphics Import Export Wizard.

The optional attribute display defines the graphic display or displays that the import XML file will be imported into. If the display attribute is set to '*' it means that the XML file will be imported into all the graphic displays. The display attribute can also be set to the name of a single graphic display which that XML file will be imported into. If this attribute is omitted, the display with the same name as the XML file is used.

The following is a sample batch import file:

<gfxImport importFolder="C:\Imports">

<import importFile="alarms.xml" importType="update" display="Assembly" />

<import importFile="indicators.xml" importType="create" display="*" />

<import importFile="misc.xml" importType="update" display="Assembly" />

<import importFile="indicators.xml" importType="create" display="Fault History" />

<import importFile="alarms.xml "display="Fault History" />

<import importFile="pumps.xml " />

</gfxImport>

See also

About XML (Extensible Markup Language)

Graphic display XML file structure

Graphic display XML schema

Graphic display XML file elements and attributes